package com.lyl.cloud.controller;

import cn.hutool.core.date.DateUtil;
import com.lyl.cloud.common.base.Result;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsulController {

    @Value("${server.port}")
    private String serverPort;

    @GetMapping("/consul")
    public Result consul(){
        String str = DateUtil.now() + "  consulTest  端口号: " + serverPort;
        System.out.println(str);
        return Result.success(str);
    }
}
